App({
  globalData: {
    needRefresh: false,
    baseUrl: 'http://127.0.0.1:8081' // 替换为实际的API地址
  },
  
  setGlobalUserInfo:function(user) {
    wx.setStorageSync('userInfo', user)
  },
  getGlobalUserInfo:function(){
    return wx.getStorageSync('userInfo')
  },
  removeGlobalUserInfo:function(){
    wx.removeStorageSync('userInfo')
  },
  setGlobalToken:function(token) {
    wx.setStorageSync('token', token)
  },
  getGlobalToken:function(){
    return wx.getStorageSync('token')
  },
  removeGlobalToken:function(){
    wx.removeStorageSync('token')
  },
}); 